feat: add TOML 1.1 support with multiline inline tables#5655
Draft
baszalmstra wants to merge 1 commit intomainfrom
Draft
feat: add TOML 1.1 support with multiline inline tables#5655baszalmstra wants to merge 1 commit intomainfrom
baszalmstra wants to merge 1 commit intomainfrom
Conversation
Contributor
Hofer-Julian
left a comment
There was a problem hiding this comment.
Really excited for this. I'd like to play a bit more with it locally before we merge it
Contributor
|
[workspace]
authors = ["Julian Hofer <julianhofer@gnome.org>"]
channels = ["conda-forge"]
name = "toml-1.1"
platforms = ["linux-64"]
version = "0.1.0"
[tasks]
[feature.test]
dependencies = {
numpy = "*"
}
[environments]
test = ["test"]Then run [feature.test]
dependencies = {
numpy = "*"
, pydantic = ">=2.12.5,<3" }I would have expected: [feature.test]
dependencies = {
numpy = "*",
pydantic = ">=2.12.5,<3",
} |
baszalmstra
pushed a commit
that referenced
this pull request
Mar 11, 2026
Adds an explicit test reproducing the issue from PR #5655 comment where inserting into a single-entry multiline inline table without a trailing comma could produce malformatted output. The fix already handles this case correctly. https://claude.ai/code/session_01FT59TTz4yRy3DPwbREE82u
Contributor
Author
|
I converted to draft because I think this could be integrated better in more places. Im working on that now. |
665528a to
3b69df2
Compare
Bump toml_edit to 0.25 / toml to 0.9.10 which support TOML 1.1 multiline inline tables. Add insert_into_inline_table_with_format to preserve multiline formatting, indentation style, and trailing comma conventions when inserting new entries. Includes comprehensive tests: direct unit tests for the formatting function (trailing commas, sequential insertions, empty tables, tab indentation, single-line fallback, existing key updates, non-dependency tables), integration tests through TomlDocument, and consolidated parse-only tests for upstream TOML 1.1 support. All tests use inline insta snapshots. https://claude.ai/code/session_01FT59TTz4yRy3DPwbREE82u
3b69df2 to
7a1d409
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Update TOML crates to support the TOML 1.1 specification, which introduces multiline inline tables and trailing commas. This improves readability of
pixi.tomlfiles by allowing users to write:Crate updates (minimum versions for TOML 1.1):
toml-span: 0.6.0 → 0.7.0 (TOML 1.1 parsing support)toml_edit: 0.23.0 → 0.25.0 (TOML 1.1 editing support)Documentation updated to note TOML 1.1 support in the manifest reference.
How Has This Been Tested?
Added 6 new tests in
pixi_manifest:toml_editpreserves multiline inline table formatting when parsing and inserting valuesAll 285
pixi_manifesttests pass. Full project builds cleanly (cargo checksucceeds).AI Disclosure
Tools: Claude Code
Checklist: